home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Online / hsc / source / ugly / ustring.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-02  |  2.1 KB  |  72 lines

  1. /*
  2.  * This source code is part of hsc, a html-preprocessor,
  3.  * Copyright (C) 1993-1997  Thomas Aglassinger
  4.  *
  5.  * This program is free software; you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation; either version 2 of the License, or
  8.  * (at your option) any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; if not, write to the Free Software
  17.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  *
  19.  */
  20. #ifndef UGLY_USTRING_H
  21. #define UGLY_USTRING_H
  22.  
  23. /*
  24.  * ugly/string.h
  25.  *
  26.  * additional string functions, header
  27.  *
  28.  * (W) by Tommy-Saftwörx in 1993,94,95
  29.  *
  30.  */
  31.  
  32. #include <stddef.h>
  33.  
  34. #include "utypes.h"
  35.  
  36. #define freestr( s ) ugly_freestr(s,__FILE__,__LINE__)
  37. #define ufreestr( s ) freestr(s),s=NULL
  38. #define strclone( s ) ugly_strclone(s,__FILE__,__LINE__)
  39. #define reallocstr( o,n ) ugly_reallocstr(o,n,__FILE__,__LINE__)
  40.  
  41. /* options for strenum */
  42. #define STEN_CASE   0           /* case sensitive search */
  43. #define STEN_NOCASE 1           /* case insensitive search */
  44.  
  45. /*
  46.  * external prototypes
  47.  */
  48.  
  49. #ifndef NOEXTERN_UGLY_USTRING_H
  50.  
  51. extern STRPTR upstr(STRPTR s);
  52. extern int upstrcmp(CONSTRPTR s1, CONSTRPTR s2);
  53. extern int upstrncmp(CONSTRPTR s1, CONSTRPTR s2, size_t n);
  54. extern STRPTR upstrstr(CONSTRPTR s1, CONSTRPTR s2);
  55.  
  56. extern void ugly_freestr(STRPTR s, STRPTR file, ULONG line);
  57. extern STRPTR ugly_strclone(CONSTRPTR oldstr, STRPTR file, ULONG line);
  58. extern void ugly_reallocstr(STRPTR * oldstr, CONSTRPTR newstr, STRPTR file, ULONG line);
  59.  
  60. extern STRPTR ustrrpbrk(CONSTRPTR str, CONSTRPTR set);
  61. extern LONG strenum(STRPTR str, STRPTR set, char sep, BYTE options);
  62.  
  63. extern int last_ch(STRPTR s);
  64. extern STRPTR ch2str(const char ch);
  65. extern BOOL str2long(STRPTR s, LONG * num);
  66. extern STRPTR long2str(LONG num);
  67.  
  68. #endif /* NOEXTERN_UGLY_USTRING_H */
  69.  
  70. #endif /* UGLY_USTRING_H */
  71.  
  72.